<template>
  <u-popup
    mode="bottom"
    v-model="showPopup"
    :z-index="999"
    border-radius="24"
    safe-area-inset-bottom
    :maskCloseAble="false"
  >
    <view class="popBox">
      <view class="popup-title">
        <view class="let"> {{ $t("common.more") }} </view>

        <i class="iconfont icon-close" @click="showPopup = false"></i>
      </view>

      <view class="popItem" @click="handle('title')">
        <view class="let">
          <i class="iconfont icon-language"></i>
          <view class="text">{{
            $t("newAdmin.goods.edit") + $t("newAdmin.goods.title")
          }}</view>
        </view>
      </view>

      <view class="popItem" @click="handle('copy', 'id')">
        <view class="let">
          <i class="iconfont icon-copy"></i>
          <view class="text">{{ $t("person.copy") }}ID</view>
        </view>
      </view>

      <!-- <view class="popItem" @click="handle('copy', 'goods')">
        <view class="let">
          <i class="iconfont icon-salescenter"></i>
          <view class="text">{{
            $t("person.copy") + $t("newAdmin.goods.link")
          }}</view>
        </view>
      </view>

      <view class="popItem" @click="handle('share')">
        <view class="let">
          <i class="iconfont icon-share"></i>
          <view class="text">{{ $t("newAdmin.goods.share") }}</view>
        </view>
      </view> -->

      <view class="popItem" @click="handle('remove')">
        <view class="let">
          <i class="iconfont icon-ashbin1"></i>
          <view class="text">{{ $t("cart.delete") }}</view>
        </view>
      </view>

      <view class="popBtn">
        <u-button
          @click="showPopup = false"
          shape="circle"
          :customStyle="{
            background: '#f2f2f2',
            color: '#262626',
            borderRadius: '32px',
          }"
          >{{$t('person.cancle')}}</u-button
        >
      </view>
    </view>
  </u-popup>
</template>

<script>
export default {
  data() {
    return {
      showPopup: false,
    };
  },

  methods: {
    handle(type, name) {
      this.Emit.$emit("handleMenu", type, name);
    },
  },
};
</script>

<style lang="less" scoped>
.popBox {
  display: flex;
  flex-direction: column;
  padding: 0 0;
}

.popup-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26rpx 36rpx;

  .let {
    font-size: 32rpx;
    color: #262626;
    font-weight: bold;
  }

  .iconfont {
    color: #262626;
  }
}

.popItem {
  display: flex;
  align-items: center;
  padding: 0 36rpx;
  height: 80rpx;

  .text {
    margin-left: 26rpx;
    font-size: 28rpx;
    color: #262626;
  }

  .iconfont {
    font-size: 40rpx;
  }

  .let {
    display: flex;
    align-items: center;
  }
}

.popBtn {
  margin-top: 20rpx;
  padding: 10rpx 30rpx;
  border-top: 1px solid #f2f2f2;
}
</style>
